<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        class Fn{
            constructor(name,age){
               //私有
                this.name=name;
                this.age=age;
                // this.num=100;
            }
            show(){}//公有 直接添加方法是公有
            //num=100//*私有  直接添加方法是私有
            //静态
            static say(){}
            static str="hello"
        }
        //想要添加公有属性只能是老方法
        Fn.prototype.num=100;
        var f=new Fn("lili",18);
        console.log(f);
    </script>
</body>
</html>